package priv.yiyuan.example.design.proxy;

/**
 * 抽象主题接口
 *
 * @author YiYuan
 * @data 2025/9/25
 * @apoNote
 */
public class RealPaymentService implements PaymentService {

    @Override
    public void processPayment(double amount, PaymentStrategy strategy) {
        System.out.println("\n[真实支付服务] 开始处理支付请求, 金额: " + amount + " 元。");

        if (strategy == null) {
            System.out.println("[真实支付服务] 错误: 未指定支付策略。");
            return;
        }

        strategy.pay(amount);
        System.out.println("[真实支付服务] 支付请求处理完毕。");
    }
}
